#include <iostream>
using namespace std;

class Point
{
private:
    // x和y座标
    int x;
    int y;

public:
    friend class Rectangle;
    Point(int x, int y) : x(x), y(y)
    {
    }

    int getX()
    {
        return x;
    }

    int getY()
    {
        return y;
    }
};

class Rectangle
{
private:
    Point topLeft;     // 左上
    Point topRight;    // 右上
    Point bottomLeft;  // 左下
    Point bottomRight; // 右下
public:
    Rectangle(Point topLeft, Point topRight, Point bottomLeft, Point bottomRight)
        : topLeft(topLeft), topRight(topRight), bottomLeft(bottomLeft), bottomRight(bottomRight)
    {
    }

    bool isRectangle()
    {
        // 判断各顶点的坐标
        return topLeft.y == topRight.y && bottomLeft.y == bottomRight.y && topLeft.x == bottomLeft.x && topRight.x == bottomRight.x && topRight.x > topLeft.x && bottomLeft.y > topLeft.y;
    }

    int getArea()
    {
        if (!isRectangle())
        {
            return 0;
        }

        int xLen = topRight.x - topLeft.x;
        int yLen = bottomLeft.y - topLeft.y;
        return xLen * yLen;
    }

    bool isIn(Point p)
    {
        if (!isRectangle())
        {
            return false;
        }

        // p的坐标和各顶点坐标判断大小
        return topRight.x > p.x && topLeft.x < p.x && bottomLeft.y > p.y && topLeft.y < p.y;
    }
};

int main()
{
    int topLeftX, topLeftY, topRightX, topRightY, bottomLeftX, bottomLeftY, bottomRightX, bottomRightY;
    int px, py;

    cin >> topLeftX >> topLeftY >> topRightX >> topRightY >> bottomLeftX >> bottomLeftY >> bottomRightX >> bottomRightY;
    cin >> px >> py;

    Point p(px, py);
    Rectangle r(Point(topLeftX, topLeftY), Point(topRightX, topRightY), Point(bottomLeftX, bottomLeftY), Point(bottomRightX, bottomRightY));
    cout << r.getArea() << endl;
    if (r.isIn(p))
        cout << "In" << endl;
    else
        cout << "Not in" << endl;

    return 0;
}